const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    nid: {type: String},//编号
    identity:{type:String},//身份证号
    name: {type: String},//姓名
    sex:{type:String},//性别
    position:{type:String},//职位
    phone:{type:String},//手机号码
    address:{type:String},//家庭地址
    department: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'Department'
    },//所属系
})

module.exports = mongoose.model('Teacher', schema)